<!-- 维修管理 -->
<template>
  <el-tabs v-model="activeName" @tab-click="handleClick">
    <el-tab-pane label="维修订单" name="first">
      <check-list ref="checkList"></check-list>
    </el-tab-pane>
    <el-tab-pane label="已完成订单" name="second">
      <check-log ref="checkLog"></check-log>
    </el-tab-pane>
  </el-tabs>
</template>

<script>
  import { mapGetters } from 'vuex'
  import { fetchRepairList } from '@/api/eims/repair-config'

  import CheckList from './form/CheckList'
  import CheckLog from './form/CheckLog'



  export default {
    data () {
      return {
        activeName: 'first',
        repairConfig: []
      }
    },
    components: {
      CheckList,
      CheckLog
    },
    computed: {
      ...mapGetters(['permissions']),
      tableHeight: function(){
        return window.innerHeight - 260
      }
    },
    methods: {
      handleClick(tab, event){
        console.log(tab,event)
      },
      // 获取维修加工部门
      getDeptList(){
        let data = {
          deptTypes : [2,8]
        }
        getDeptInfoByDeptTypes(data).then(result => {
          let dataList = result.data.data
          let options = []
          dataList.forEach(item => {
            options.push({value:item.id,name:item.name})
          })
          this.deptOptions = options
        })
      },
    }
  }
</script>
